import request from '@/utils/request'

// 查询音乐曲目列表
export function listTracks(query) {
  return request({
    url: '/site/tracks/list',
    method: 'get',
    params: query
  })
}

// 查询音乐曲目详细
export function getTracks(trackId) {
  return request({
    url: '/site/tracks/' + trackId,
    method: 'get'
  })
}

// 新增音乐曲目
export function addTracks(data) {
  return request({
    url: '/site/tracks',
    method: 'post',
    data: data
  })
}

// 修改音乐曲目
export function updateTracks(data) {
  return request({
    url: '/site/tracks',
    method: 'put',
    data: data
  })
}

// 删除音乐曲目
export function delTracks(trackId) {
  return request({
    url: '/site/tracks/' + trackId,
    method: 'delete'
  })
}
